import { defHttp } from '@/utils/http/axios';

// 获取预约记录
export const getReserveSeatListApi = (params: any) =>
  defHttp.get({
    url: '/face_recognition/reserve/reserve_seat',
    params,
  });

// 预约座位
export const reserveSeatApi = (data: any) =>
  defHttp.post({
    url: '/face_recognition/reserve/reserve_seat',
    data,
  });

// 更新预约
export const updateReserveSeatApi = (data: any) =>
  defHttp.put({
    url: '/face_recognition/reserve/update_reserve_seats',
    data,
  });

// 取消预约座位
export const cancelReserveSeatApi = (data: any) =>
  defHttp.put({
    url: '/face_recognition/reserve/cancel_reserve_seats',
    data,
  });

// 入座
export const seatReserveSeatApi = (data: any) =>
  defHttp.put({
    url: '/face_recognition/reserve/be_seat',
    data,
  });

// 离座
export const leaveReserveSeatApi = (data: any) =>
  defHttp.put({
    url: '/face_recognition/reserve/leave_seat',
    data,
  });

// 上传
export const uploadFaceApi = (data: any) =>
  defHttp.post({
    url: '/upload/upload',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  });
